www.gusucode.com > 落叶冰点万能企业网站内容管理系统 V9.1 > 落叶冰点万能企业网站内容管理系统 V9.1\code\admin\D_space_size.asp
<% '************************************************************** ' 新动软网站管理系统 ' 官方网站: http://www.aspcpu.com ' 系统作者: 阮丁远(网名:天下程序) ' Copyright 新动软网站管理系统 版权所有 '************************************************************** %> <% dir_set="../" %> <!--#include file=../inc/conn.asp--> <!--#include file=../inc/Functionb.asp--> <!--#include file=../inc/ajaxLIB.asp--> <!--#include file=inc/checkadmin1.asp--> <!--#include file=../inc/ND_class_function.asp--> <!--#include file=adminHTML/makehtm_inc/D_kaozhan_class.asp--> <LINK href="css.css" type=text/css rel=stylesheet> <% on error resume next Function ishaveobj(ByVal strClassString) Dim xTestObj,ClsString On Error Resume Next ishaveobj = False ClsString = strClassString Err = 0 Set xTestObj = Server.CreateObject(ClsString) If Err = 0 Then ishaveobj = True If Err = -2147352567 Then ishaveobj = True Set xTestObj = Nothing Err = 0 Exit Function End Function '------------------检查某一目录是否存在------------------- Function CheckDir(FolderPath) folderpath=Server.MapPath(".")&"\"&folderpath Set fso1 = Server.CreateObject(fssoo_nd_var_str_x_customx) If fso1.FolderExists(FolderPath) then '存在 CheckDir = True Else '不存在 CheckDir = False End if Set fso1 = nothing End Function '-------------根据指定名称生成目录----------------------- Function MakeNewsDir(foldername) dim f MakeNewsDir = False Set fso1 = Server.CreateObject(fssoo_nd_var_str_x_customx) Set f = fso1.CreateFolder(foldername) MakeNewsDir = True Set fso1 = nothing End Function '=====================系统空间参数========================= Sub ShowSpaceInfo(drvpath) dim fso,d,size,showsize set fso= Server.CreateObject(fssoo_nd_var_str_x_customx) drvpath=server.mappath(drvpath) set d=fso.getfolder(drvpath) size=d.size showsize=size & " Byte" if size>1024 then size=(Size/1024) showsize=size & " KB" end if if size>1024 then size=(size/1024) showsize=formatnumber(size,2) & " MB" end if if size>1024 then size=(size/1024) showsize=formatnumber(size,2) & " GB" end if response.write "<font face=verdana>" & showsize & "</font>" End Sub Sub Showspecialspaceinfo(method) dim fso,d,fc,f1,size,showsize,drvpath set fso= Server.CreateObject(fssoo_nd_var_str_x_customx) drvpath=server.mappath("../index.asp") drvpath=left(drvpath,(instrrev(drvpath,"\")-1)) set d=fso.getfolder(drvpath) if method="All" then size=d.size elseif method="Program" then set fc=d.Files for each f1 in fc size=size+f1.size next end if showsize=size & " Byte" if size>1024 then size=(Size/1024) showsize=size & " KB" end if if size>1024 then size=(size/1024) showsize=formatnumber(size,2) & " MB" end if if size>1024 then size=(size/1024) showsize=formatnumber(size,2) & " GB" end if response.write "<font face=verdana>" & showsize & "</font>" end sub Function Drawbar(drvpath) dim fso,drvpathroot,d,size,totalsize,barsize set fso= Server.CreateObject(fssoo_nd_var_str_x_customx) drvpathroot=server.mappath("../index.asp") drvpathroot=left(drvpathroot,(instrrev(drvpathroot,"\")-1)) set d=fso.getfolder(drvpathroot) totalsize=d.size drvpath=server.mappath(drvpath) if fso.FolderExists(drvpath) then set d=fso.getfolder(drvpath) size=d.size End If barsize=cint((size/totalsize)*400) Drawbar=barsize End Function Function Drawspecialbar() dim fso,drvpathroot,d,fc,f1,size,totalsize,barsize set fso= Server.CreateObject(fssoo_nd_var_str_x_customx) drvpathroot=server.mappath("../index.asp") drvpathroot=left(drvpathroot,(instrrev(drvpathroot,"\")-1)) set d=fso.getfolder(drvpathroot) totalsize=d.size set fc=d.files for each f1 in fc size=size+f1.size next barsize=cint((size/totalsize)*400) Drawspecialbar=barsize End Function Function GetAllSpace() Dim fso,drvpath,d,size set fso= Server.CreateObject(fssoo_nd_var_str_x_customx) drvpath=server.mappath("../index.asp") drvpath=left(drvpath,(instrrev(drvpath,"\")-1)) set d=fso.getfolder(drvpath) size=d.size set fso=nothing GetAllSpace = size End Function Function GetFileSize(FileName) Dim fso,drvpath,d,size,showsize set fso= Server.CreateObject(fssoo_nd_var_str_x_customx) drvpath=server.mappath(FileName) set d=fso.getfile(drvpath) size=d.size showsize=size & " Byte" if size>1024 then size=(Size/1024) showsize=size & " KB" end if if size>1024 then size=(size/1024) showsize=formatnumber(size,2) & " MB" end if if size>1024 then size=(size/1024) showsize=formatnumber(size,2) & " GB" end if set fso=nothing GetFileSize = showsize End Function %> <style type="text/css"> <!-- .STYLE1 {color: #FFFFFF} body { background-color: #E3E3E3; } --> </style> <br/> <table width="96%" border="1" align="center" cellpadding="0" cellspacing="0" bgcolor="#EFEFEF" class="tableBorder"> <tr> <td height="25" colspan="2" align="left" bgcolor="#0033CC" class="adminth"><span class="STYLE1">系统空间占用统计</span></th> </tr> <tr> <td width="150" height="23">总大小</td> <td style="line-height: 150%"> <%call ShowSpaceInfo("../")%> <br /></td> </tr> <tr> <td width="150" height="23">当前数据库文件大小</td> <td style="line-height: 150%"> <%response.write GetFileSize(dir_set&main_data_mdb)%> <br /></td> </tr> <tr> <td width="150" height="23">数据库data目录总大小</td> <td style="line-height: 150%"> <%call ShowSpaceInfo("../data")%> <br /></td> </tr> <tr> <td width="150" height="23">数据库data目录中数据库备份目录(databakup)大小</td> <td style="line-height: 150%"> <%call ShowSpaceInfo("../data/databakup")%> <br /></td> </tr> <tr> <td width="150" height="23">数据库data目录中 安装新模板前自动备份的数据库 所在目录大小</td> <td style="line-height: 150%"> <%call ShowSpaceInfo("../data/安装新模板前自动备份的数据库")%> <br /></td> </tr> <tr> <td width="150" height="23">数据库data目录中 在线升级前自动备份的数据库 所在目录大小</td> <td style="line-height: 150%"> <%call ShowSpaceInfo("../data/在线升级前自动备份的数据库")%> <br /></td> </tr> <tr> <td width="150" height="23">数据库data目录中 执行sql脚本前的自动备份 所在目录大小</td> <td style="line-height: 150%"> <%call ShowSpaceInfo("../data/执行sql脚本前的自动备份")%> <br /></td> </tr> <tr> <td width="150" height="23">文件上传目录(uploadfile)大小</td> <td style="line-height: 150%"> <%call ShowSpaceInfo("../uploadfile")%> <br /></td> </tr> <tr> <td width="150" height="23">模板目录(templates)大小</td> <td style="line-height: 150%"> <%call ShowSpaceInfo("../templates")%> <br /></td> </tr> <tr> <td width="150" height="23">标签目录(Label)大小</td> <td style="line-height: 150%"> <%call ShowSpaceInfo("../Label")%> <br /></td> </tr> <tr> <td width="150" height="23">管理目录(<%=nd_web_admin_folder%>)大小</td> <td style="line-height: 150%"> <%call ShowSpaceInfo("../"&nd_web_admin_folder)%> <br /></td> </tr> <tr> <td width="150" height="23">cms子系统 前台asp目录(<%=nd_web_output_folder%>)大小</td> <td style="line-height: 150%"> <%call ShowSpaceInfo("../"&nd_web_output_folder)%> <br /></td> </tr> </tr> <tr> <td width="150" height="23">企业子系统 前台asp目录(<%=nd_web_output_folder_qiye%>)大小</td> <td style="line-height: 150%"> <%call ShowSpaceInfo("../"&nd_web_output_folder_qiye)%> <br /></td> </tr> <tr> <td width="150" height="23">/bbs/目录大小</td> <td style="line-height: 150%"> <%call ShowSpaceInfo("../bbs")%> <br /></td> </tr> <tr> <td width="150" height="23">/blog/目录大小</td> <td style="line-height: 150%"> <%call ShowSpaceInfo("../blog")%> <br /></td> </tr> <tr> <td width="150" height="23">/mcenter/目录大小</td> <td style="line-height: 150%"> <%call ShowSpaceInfo("../mcenter")%> <br /></td> </tr> <tr> <td width="150" height="23">cms系统htm静态页目录大小</td> <td style="line-height: 150%"> <%call ShowSpaceInfo("../"&nd_webhtml_output_folder)%> <br /></td> </tr> <tr> <td width="150" height="23">企业站系统htm静态页目录大小</td> <td style="line-height: 150%"> <%call ShowSpaceInfo("../"&nd_webhtml_output_folder_qiye)%> <br /></td> </tr> <tr> <td width="150" height="23">一键拷站系统储存目录大小</td> <td style="line-height: 150%"> <%call ShowSpaceInfo("../"&ttahtml)%> <br /></td> </tr> </table>